package LeetCode.leetcode700;

public class Review1 {
    public TreeNode searchBST(TreeNode root, int val) {
        if (root == null) return null;
        if (root.val == val) return root;
        TreeNode node;
        if ((node = searchBST(root.left,val)) != null) return node;
        if ((node = searchBST(root.right,val)) != null) return node;
        return null;
    }
}
